@include("template::My.views.header")  
<link href="/mycms/cms/theme/My/assets/css/goods.css" rel="stylesheet">
</head>
<body class="bg-gradient-to-b from-[#EAF0FF] to-[#F9F9F9]  min-h-full">
        <div class="container mx-auto w-11/12 rounded-2xl bg-black h-48 mt-5">
        </div>
        <div class="container mx-auto w-11/12 rounded-2xl bg-white  mt-5 h-auto">
            <div>
                <img src="/mycms/cms/theme/My/assets/img/top.png" class="rounded-t-2xl">
            </div>
            <div class="h-auto  p-4">
                <div class="text-base  text-[#0B0B0B] font-['PingFang'] font-bold py-2">精装定制 荣誉证书+纪念礼品</div>
                <p class="text-[#A2ABBD] font-['PingFang'] font-medium">1. 手工制作，精心打造，时尚简约 2. PVC材质，质感明亮，清新亮丽 注：自愿选择领取，用于活动留念与收藏</p>
                <div class=" font-['PingFang'] py-3 font-bold text-2xl text-[#FF8E00] " >¥36 <input type="checkbox" class="text-[#3368FD] w-8 h-8 mr-2 rounded-full focus:ring-indigo-400 focus:ring-opacity-25 border border-gray-300 justify-end "  /></div> 
            </div>
        </div>
        <div class="container mx-auto  mt-10 pb-52 flex items-center  justify-center  ">
            <button  class="bg-[#3368FD]   rounded-full shadow-xl shadow-blue-400/30 w-40  h-12  text-white font-bold text-xl">下一步</button>
        </div>
<script>
    function buy() {
        $.ajax({
            url: '{{route('store.create.order')}}',
            type: 'post',
            contentType: "application/x-www-form-urlencoded; charset=UTF-8",
            dataType: "json",
            data: {
                "goods_id": {{$goods->id}},
                "empower": $('input[name="empower"]:checked').val()
            },
            timeout: 60000,
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            },
            success: function (res) {
                $('#qrcode').html('');
                new QRCode(document.getElementById("qrcode"), res.pay_url);

                var left = ($(window).width() - 256) / 2;
                var top = ($(window).height() - 256) / 2;
                top += $(window).scrollTop();

                $('#qrcode-box').css({'left': left + 'px','top': top + 'px', 'position': 'absolute', 'z-index': 2});
                $('#qrcode-box').show();
            },
            error: function (xhr) {
                alert(xhr.responseJSON.msg);
                return false;
            }
        });
    }
</script>

<div class="clearfix"></div>
@include("template::mycms.views._footer")
